<?php
use think\facade\Route;
Route::post('auth/captcha','Auth/captcha');
//  菜单管理模块
Route::group('menus',function(){
    Route::get('/routes','menus/adminList');
    Route::get('','menus/index');
    Route::get('/data/:id','menus/read');
    Route::get('/options','menus/options');
    Route::post('','menus/save');
    Route::put('/:id','menus/save');
    Route::delete('/:id','menus/delete');
})->middleware('Auth');
//
//Route::get('users/data','users/admin')->middleware('Auth');
//Route::resource('users','users')->middleware('Auth');
// 角色模块
Route::resource('roles','roles')->middleware('Auth');

// 字典模块
Route::group('dict',function (){
    Route::get(':field/options','dict/options');
    Route::get('/area/:id','dict/area');
});
// 账号管理
Route::group('users',function(){
    Route::get('/check/:users','users/checkUnique');
    Route::get('/checkPhone/:phone','users/checkPhone');
    Route::get('','users/index');
    Route::get('/data','users/admin');
    Route::get('/routes','users/adminList');
    Route::get('/options','users/options');
    Route::post('/reset/:id','users/reset');
    Route::get('/:id','users/read');
    Route::post('','users/save');
    Route::put('/password','users/editPassword');
    Route::put('/:id','users/edit');
    Route::delete('/:id','users/delete');
})->middleware('Auth');
// 机构管理
Route::get('organ/options','organ/options')->middleware('Auth');
Route::post('organ/import','organ/importData')->middleware('Auth');
Route::resource('organ','organ')->middleware('Auth');
// 地区管理
Route::resource('area','area');
Route::post('examiner/import','examiner/importData')->middleware('Auth');
Route::resource('examiner','examiner')->middleware('Auth');
// 活动管理
Route::get('active/createQRCode/:id','active/createQRCode')->middleware('Auth');
Route::get('active/getDate/:id','active/getDate')->middleware('Auth');
Route::get('active/getFiles/:id','active/getFiles')->middleware('Auth');
Route::resource('active','active')->middleware('Auth');
// 报名管理
Route::get('signup/template/:id','signup/downloadTemplate')->middleware('Auth');
Route::post('signup/import','signup/importSignUp')->middleware('Auth');
Route::put('signup/pay/:id','signup/pay')->middleware('Auth');
Route::resource('signup','signup')->middleware('Auth');
// 活动分组管理
Route::resource('group','group')->middleware('Auth');
// 文件上传
Route::resource('files','files')->middleware('Auth');
// 考场管理
Route::post('exam/upload','exam/upload');
Route::get('exam/getVideo/:id','exam/getVideo')->middleware('Auth');
Route::resource('exam','exam')->middleware('Auth');

